In [ ]:
import os
import rasterio
import matplotlib.pyplot as plt
import pandas as pd
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import balanced_accuracy_score, cohen_kappa_score
from sklearn.model_selection import StratifiedKFold
import rasterio
from rasterio.mask import mask
import geopandas as gpd
import numpy as np
from shapely.geometry import mapping
import geopandas as gpd
In [ ]:
import os # we need os to do some basic file operations
sentinal_fp = "C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/"
# find every file in the sentinal_fp directory
sentinal_band_paths = [os.path.join(sentinal_fp, f) for f in os.listdir(sentinal_fp) if os.path.isfile(os.path.join(sentinal_fp, f))]
sentinal_band_paths.sort()
sentinal_band_paths
Out[ ]:
['C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/Image_bbox01.tif', 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/Image_bbox01.tif.ovr', 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/Image_bbox012.tif', 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goeggingen.tif', 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goeggingen.tif.aux.xml', 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goeggingen.tif.ovr', 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/satellite_prompts.tif', 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/satellite_prompts2.tif']
In [ ]:
#file_path = 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/data/osm_all.geojson'
file_path = 'C:/Users/leoni/Documents/Uni/UGS/Project/Funktionert/data/goeggingen_merge.shp'
data = gpd.read_file(file_path)
data
Out[ ]:
| OBJECTID | osmid | class | geom_Lengt | geom_Area | value | Shape_Leng | Shape_Area | geometry | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1.0 | 34995210.0 | recreation_ground | 0.001187 | 6.011116e-08 | 0.0 | 0.001187 | 6.011104e-08 | POLYGON ((10.86834 48.35136, 10.86819 48.35118... |
| 1 | 2.0 | 69217096.0 | recreation_ground | 0.003760 | 3.623313e-07 | 0.0 | 0.003760 | 3.623316e-07 | POLYGON ((10.86053 48.34204, 10.86034 48.34172... |
| 2 | 3.0 | 403287451.0 | recreation_ground | 0.003043 | 4.437459e-07 | 0.0 | 0.003043 | 4.437458e-07 | POLYGON ((10.85867 48.33885, 10.85856 48.33875... |
| 3 | 4.0 | 37104444.0 | grass | 0.003839 | 6.745710e-07 | 0.0 | 0.003839 | 6.745711e-07 | POLYGON ((10.86042 48.34162, 10.86006 48.34137... |
| 4 | 5.0 | 48164805.0 | grass | 0.005284 | 6.108334e-07 | 0.0 | 0.005284 | 6.108332e-07 | POLYGON ((10.86454 48.34256, 10.86453 48.34251... |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 609 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000095 | 4.207945e-10 | POLYGON ((10.86779 48.34496, 10.86779 48.34496... |
| 610 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000107 | 6.216258e-10 | POLYGON ((10.86790 48.34496, 10.86792 48.34496... |
| 611 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000116 | 5.833541e-10 | POLYGON ((10.86707 48.34495, 10.86707 48.34495... |
| 612 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000095 | 3.681662e-10 | POLYGON ((10.86744 48.34494, 10.86746 48.34494... |
| 613 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000154 | 1.099781e-09 | POLYGON ((10.86738 48.34493, 10.86739 48.34493... |
614 rows × 9 columns
In [ ]:
data.explore()
Out[ ]:
Make this Notebook Trusted to load map: File -> Trust Notebook
In [ ]:
# create a products directory within the data dir which won't be uploaded to Github
img_dir = 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/'
# check to see if the dir it exists, if not, create it
if not os.path.exists(img_dir):
os.makedirs(img_dir)
# filepath for image we're writing out
img_fp = img_dir + 'goeggingen.tif'
# Read metadata of first file and assume all other bands are the same
with rasterio.open(sentinal_band_paths[0]) as src0:
meta = src0.meta
# Update metadata to reflect the number of layers
meta.update(count = len(sentinal_band_paths))
In [ ]:
full_dataset = rasterio.open(img_fp)
img_rows, img_cols = full_dataset.shape
img_bands = full_dataset.count
print(full_dataset.shape) # dimensions
print(full_dataset.count) # bands
(7909, 8650) 3
In [ ]:
full_dataset = rasterio.open(img_fp)
raster_crs = full_dataset.crs
In [ ]:
from rasterio.warp import calculate_default_transform, reproject, Resampling
# Define the source and destination coordinate reference systems
src_crs = 'EPSG:32632'
dst_crs = 'EPSG:4326'
# Open the original dataset
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goeggingen.tif') as src:
# Calculate the transform and dimensions for the new dataset
transform, width, height = calculate_default_transform(
src.crs, dst_crs, src.width, src.height, *src.bounds)
# Define the metadata for the new dataset
kwargs = src.meta.copy()
kwargs.update({
'crs': dst_crs,
'transform': transform,
'width': width,
'height': height
})
# Create the new dataset and reproject the original data into it
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif', 'w', **kwargs) as dst:
for i in range(1, src.count + 1): # Loop through all bands
reproject(
source=rasterio.band(src, i),
destination=rasterio.band(dst, i),
src_transform=src.transform,
src_crs=src.crs,
dst_transform=transform,
dst_crs=dst_crs,
resampling=Resampling.nearest)
In [ ]:
shapefile = gpd.read_file('C:/Users/leoni/Documents/Uni/UGS/Project/Funktionert/data/goeggingen_merge.shp')
shapefile.crs
Out[ ]:
<Geographic 2D CRS: EPSG:4326> Name: WGS 84 Axis Info [ellipsoidal]: - Lat[north]: Geodetic latitude (degree) - Lon[east]: Geodetic longitude (degree) Area of Use: - name: World. - bounds: (-180.0, -90.0, 180.0, 90.0) Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich
In [ ]:
shapefile = shapefile.to_crs(epsg=32632)
shapefile.crs
Out[ ]:
<Projected CRS: EPSG:32632> Name: WGS 84 / UTM zone 32N Axis Info [cartesian]: - E[east]: Easting (metre) - N[north]: Northing (metre) Area of Use: - name: Between 6°E and 12°E, northern hemisphere between equator and 84°N, onshore and offshore. Algeria. Austria. Cameroon. Denmark. Equatorial Guinea. France. Gabon. Germany. Italy. Libya. Liechtenstein. Monaco. Netherlands. Niger. Nigeria. Norway. Sao Tome and Principe. Svalbard. Sweden. Switzerland. Tunisia. Vatican City State. - bounds: (6.0, 0.0, 12.0, 84.0) Coordinate Operation: - name: UTM zone 32N - method: Transverse Mercator Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich
In [ ]:
shapefile
Out[ ]:
| OBJECTID | osmid | class | geom_Lengt | geom_Area | value | Shape_Leng | Shape_Area | geometry | |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 1.0 | 34995210.0 | recreation_ground | 0.001187 | 6.011116e-08 | 0.0 | 0.001187 | 6.011104e-08 | POLYGON ((638418.168 5357040.085, 638407.425 5... |
| 1 | 2.0 | 69217096.0 | recreation_ground | 0.003760 | 3.623313e-07 | 0.0 | 0.003760 | 3.623316e-07 | POLYGON ((637864.666 5355990.298, 637851.396 5... |
| 2 | 3.0 | 403287451.0 | recreation_ground | 0.003043 | 4.437459e-07 | 0.0 | 0.003043 | 4.437458e-07 | POLYGON ((637735.566 5355632.803, 637727.565 5... |
| 3 | 4.0 | 37104444.0 | grass | 0.003839 | 6.745710e-07 | 0.0 | 0.003839 | 6.745711e-07 | POLYGON ((637857.641 5355943.107, 637831.756 5... |
| 4 | 5.0 | 48164805.0 | grass | 0.005284 | 6.108334e-07 | 0.0 | 0.005284 | 6.108332e-07 | POLYGON ((638160.506 5356054.803, 638159.554 5... |
| ... | ... | ... | ... | ... | ... | ... | ... | ... | ... |
| 609 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000095 | 4.207945e-10 | POLYGON ((638394.604 5356328.221, 638394.803 5... |
| 610 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000107 | 6.216258e-10 | POLYGON ((638402.569 5356327.820, 638404.160 5... |
| 611 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000116 | 5.833541e-10 | POLYGON ((638341.160 5356325.928, 638341.359 5... |
| 612 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000095 | 3.681662e-10 | POLYGON ((638368.624 5356325.209, 638370.015 5... |
| 613 | 0.0 | 0.0 | grave | 0.000000 | 0.000000e+00 | 255.0 | 0.000154 | 1.099781e-09 | POLYGON ((638364.478 5356323.919, 638364.876 5... |
614 rows × 9 columns
In [ ]:
shapefile = shapefile.to_crs({'init': 'epsg:4326'})
shapefile.crs
c:\Users\leoni\Programme\Miniconda\envs\geo\Lib\site-packages\pyproj\crs\crs.py:141: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method. When making the change, be mindful of axis order changes: https://pyproj4.github.io/pyproj/stable/gotchas.html#axis-order-changes-in-proj-6 in_crs_string = _prepare_from_proj_string(in_crs_string)
Out[ ]:
<Geographic 2D CRS: +init=epsg:4326 +type=crs> Name: WGS 84 Axis Info [ellipsoidal]: - lon[east]: Longitude (degree) - lat[north]: Latitude (degree) Area of Use: - name: World. - bounds: (-180.0, -90.0, 180.0, 90.0) Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich
In [ ]:
# this generates a list of shapely geometries
geoms = shapefile.geometry.values
# let's grab a single shapely geometry to check
geometry = geoms[0]
print(type(geometry))
print(geometry)
# transform to GeoJSON format
from shapely.geometry import mapping
feature = [mapping(geometry)] # can also do this using polygon.__geo_interface__
print(type(feature))
print(feature)
<class 'shapely.geometry.polygon.Polygon'>
POLYGON ((10.868342999629759 48.35135819992104, 10.868191400013131 48.351177900239975, 10.868132900013393 48.351179599958634, 10.868118400244045 48.35118920022149, 10.868145200040999 48.35122150027205, 10.868130399898064 48.35134139968591, 10.86820251743228 48.35149824414873, 10.86851823073181 48.351498231558196, 10.868342999629759 48.35135819992104))
<class 'list'>
[{'type': 'Polygon', 'coordinates': (((10.868342999629759, 48.35135819992104), (10.868191400013131, 48.351177900239975), (10.868132900013393, 48.351179599958634), (10.868118400244045, 48.35118920022149), (10.868145200040999, 48.35122150027205), (10.868130399898064, 48.35134139968591), (10.86820251743228, 48.35149824414873), (10.86851823073181, 48.351498231558196), (10.868342999629759, 48.35135819992104)),)}]
In [ ]:
full_dataset.close()
In [ ]:
import geopandas as gpd
import rasterio
from rasterio.mask import mask
from shapely.geometry import mapping
from shapely.geometry import box
# Load the shapefile
#shapefile = gpd.read_file(shapefile_path)
# Check if the CRS matches, if not, reproject
if shapefile.crs != raster_crs:
shapefile = shapefile.to_crs(raster_crs)
# Check that geometries are valid
shapefile['valid'] = shapefile.is_valid
shapefile = shapefile[shapefile['valid']]
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif') as src:
raster_bounds = src.bounds
raster_bbox = box(*raster_bounds) # Create a bounding box from the raster bounds
# Only proceed if the raster and shapefile overlap
if not shapefile.unary_union.intersects(raster_bbox):
raise ValueError("Shapefile and raster do not overlap")
else:
print("The shapefile and raster overlap.")
# Extract the raster values within the polygon
for geom in shapefile.geometry:
feature = [mapping(geom)]
out_image, out_transform = mask(src, feature, crop=True)
# process out_image
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) Cell In[27], line 26 24 # Only proceed if the raster and shapefile overlap 25 if not shapefile.unary_union.intersects(raster_bbox): ---> 26 raise ValueError("Shapefile and raster do not overlap") 27 else: 28 print("The shapefile and raster overlap.") ValueError: Shapefile and raster do not overlap
In [ ]:
# Reproject the shapefile to match the raster's CRS
shapefile = shapefile.to_crs(epsg=32632)
In [ ]:
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif') as src:
print(src.bounds)
print(shapefile.total_bounds)
BoundingBox(left=10.8498, bottom=48.33740067665543, right=10.8730000694298, top=48.351499999999994) [ 637044.26852859 5355464.36639753 638799.87366649 5357061.94037001]
In [ ]:
shapefile = shapefile.to_crs("EPSG:4326")
print(shapefile.total_bounds)
shapefile.crs
[10.84979875 48.33740369 10.87299742 48.35149895]
Out[ ]:
<Geographic 2D CRS: EPSG:4326> Name: WGS 84 Axis Info [ellipsoidal]: - Lat[north]: Geodetic latitude (degree) - Lon[east]: Geodetic longitude (degree) Area of Use: - name: World. - bounds: (-180.0, -90.0, 180.0, 90.0) Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich
In [ ]:
import matplotlib.pyplot as plt
import rasterio
import rasterio.plot
fig, ax = plt.subplots(figsize=(10, 10))
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif') as src:
rasterio.plot.show(src, ax=ax)
shapefile.plot(ax=ax, facecolor='none', edgecolor='red')
plt.show()
In [ ]:
from shapely.geometry import box
from shapely.affinity import scale
# Open the raster file and get its bounds
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif') as src:
bounds = src.bounds
# Create a slightly smaller bounding box geometry from the raster bounds
# Reduce each side of the bounding box by a small fraction, e.g., 0.99 to reduce by 1%
smaller_bbox = scale(box(bounds.left, bounds.bottom, bounds.right, bounds.top), xfact=0.99, yfact=0.99, origin='center')
# Create a GeoDataFrame from the smaller bounding box
smaller_bbox_gdf = gpd.GeoDataFrame({'geometry': [smaller_bbox]}, crs=src.crs)
# Make sure the shapefile is in the same CRS as the raster
shapefile = shapefile.to_crs(src.crs)
# Perform a spatial join to find features completely within the smaller bounding box
within_shapefile = gpd.sjoin(shapefile, smaller_bbox_gdf, op='within')
# Save the clipped shapefile to a new file
within_shapefile.to_file('within_shapefile_goeggingen.gpkg', driver='GPKG')
c:\Users\leoni\Programme\Miniconda\envs\geo\Lib\site-packages\IPython\core\interactiveshell.py:3466: FutureWarning: The `op` parameter is deprecated and will be removed in a future release. Please use the `predicate` parameter instead. if await self.run_code(code, result, async_=asy):
In [ ]:
shapefile = within_shapefile
In [ ]:
import matplotlib.pyplot as plt
import rasterio
import rasterio.plot
fig, ax = plt.subplots(figsize=(10, 10))
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif') as src:
rasterio.plot.show(src, ax=ax)
shapefile.plot(ax=ax, facecolor='none', edgecolor='red')
plt.show()
In [ ]:
shapefile = shapefile.to_crs("EPSG:4326")
shapefile.crs
Out[ ]:
<Geographic 2D CRS: EPSG:4326> Name: WGS 84 Axis Info [ellipsoidal]: - Lat[north]: Geodetic latitude (degree) - Lon[east]: Geodetic longitude (degree) Area of Use: - name: World. - bounds: (-180.0, -90.0, 180.0, 90.0) Datum: World Geodetic System 1984 ensemble - Ellipsoid: WGS 84 - Prime Meridian: Greenwich
In [ ]:
from rasterio.mask import mask
from shapely.geometry import mapping
from shapely.geometry import box
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif') as src:
raster_bounds = src.bounds
raster_bbox = box(*raster_bounds) # Create a bounding box from the raster bounds
# Only proceed if the raster and shapefile overlap
if not shapefile.unary_union.intersects(raster_bbox):
raise ValueError("Shapefile and raster do not overlap")
else:
print("The shapefile and raster overlap.")
# Extract the raster values within the polygon
for geom in shapefile.geometry:
feature = [mapping(geom)]
out_image, out_transform = mask(src, feature, crop=True)
The shapefile and raster overlap.
In [ ]:
import numpy as np
# Initialize a list to hold the mean values for each band
band_means = []
# Extract the raster values within the polygon
for geom in shapefile.geometry:
feature = [mapping(geom)]
with rasterio.open('C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif') as src:
out_image, out_transform = mask(src, feature, crop=True)
# Calculate mean of each band, excluding no-data values
means = np.ma.array(out_image, mask=out_image == src.nodata).mean(axis=(1, 2))
band_means.append(means.filled(src.nodata))
In [ ]:
import numpy as np
import rasterio
from rasterio.mask import mask
from shapely.geometry import mapping
import geopandas as gpd
from rasterio.features import geometry_mask
img_fp = 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif'
X = np.array([], dtype=np.float32).reshape(0, 3) # Replace '8' with the actual number of bands if different
y = [] # Initialize y as an empty list
incomplete_features = []
with rasterio.open(img_fp) as src:
raster_crs = src.crs
nodata = src.nodatavals[0] # Assuming all bands have the same nodata value
band_count = src.count
# Iterate over the geometries in the shapefile
for index, row in shapefile.iterrows():
geom = row['geometry']
# Create a mask for the current geometry
geom_mask = geometry_mask([geom], transform=src.transform, invert=True, out_shape=(src.height, src.width))
# Check if the geometry intersects with the raster
if not geom_mask.all():
out_image, out_transform = mask(src, [geom], crop=True, nodata=nodata)
out_image_masked = np.ma.masked_equal(out_image, nodata)
valid_data = out_image_masked.compressed()
# Ensure we have a complete set of pixels for all bands
if valid_data.size % band_count == 0:
out_image_reshaped = valid_data.reshape(-1, band_count)
# Remove rows that contain nodata values
valid_rows = np.all(out_image_reshaped != nodata, axis=1)
out_image_reshaped = out_image_reshaped[valid_rows]
# Only proceed if we have valid data left after removing nodata rows
if out_image_reshaped.size > 0:
X = np.vstack((X, out_image_reshaped))
y.extend([row['class']] * out_image_reshaped.shape[0])
else:
# Collect indices of incomplete features to handle later
incomplete_features.append(index)
print(f"Feature {index} does not have a complete set of pixels.")
# Handle incomplete features as needed
# For example, you might want to drop them from the shapefile
shapefile = shapefile.drop(incomplete_features)
In [ ]:
# Initialize empty arrays for the pixel values and labels
X = np.array([], dtype=np.float32).reshape(0, 3) # Replace '8' with the number of bands
y = []
with rasterio.open(img_fp) as src:
# Ensure the shapefile is in the same CRS as the raster
shapefile = shapefile.to_crs(src.crs)
nodata = src.nodatavals[0] # Assuming all bands have the same nodata value
# Loop through each feature in the shapefile
for index, row in shapefile.iterrows():
geom = row.geometry
# Mask the raster with the geometry
out_image, out_transform = mask(src, [geom], crop=True, nodata=nodata, filled=False)
# Check if there is any valid data
if np.any(out_image.mask == False):
# Reshape and append to X and y
valid_pixels = out_image.data[~out_image.mask].reshape(-1, src.count)
X = np.vstack((X, valid_pixels))
y.extend([row['class']] * valid_pixels.shape[0])
In [ ]:
out_image
Out[ ]:
masked_array(
data=[[[--, --, --, --, --, --, --, --, --, --, --, --, --, --, --,
123, 76, --, --, --, --],
[--, --, --, --, --, --, --, --, --, --, --, --, 123, 133, 104,
109, 124, --, --, --, --],
[--, --, --, --, --, --, --, 187, 148, 148, 181, 191, 175, 168,
142, 134, 146, 146, 120, --, --],
[--, 181, 181, 167, 169, 197, 200, 197, 182, 182, 203, 185,
151, 148, 130, 171, 150, 150, 113, 22, --],
[--, 177, 177, 177, 185, 188, 161, 188, 183, 183, 181, 158,
140, 144, 80, 133, 133, 133, 112, 55, --],
[--, 186, 186, 196, 176, 162, 152, 89, 157, 157, 188, 193, 191,
170, 48, 93, 131, 131, 128, 73, --],
[178, 165, 165, 181, 193, 195, 186, 57, 144, 144, 198, 224,
224, 189, 88, 105, 123, 123, 119, 40, 42],
[177, 153, 153, 172, 195, 202, 188, 160, 198, 198, 197, 199,
203, 182, 139, 135, 109, 109, 112, 23, 24],
[134, 150, 150, 154, 211, 191, 193, 196, 199, 199, 203, 185,
172, 161, 143, 155, 103, 103, 130, 21, 18],
[110, 122, 122, 127, 174, 177, 184, 158, 135, 135, 140, 155,
160, 137, 121, 153, 133, 133, 142, 31, 20],
[165, 168, 168, 131, 125, 142, 156, 118, 114, 114, 131, 129,
99, 55, 44, 90, 151, 151, 167, 72, --],
[209, 207, 207, 146, 102, 137, 153, 105, 121, 121, 125, 77, 30,
9, 9, 41, 138, 138, 163, --, --],
[--, 180, 180, 141, 108, 149, 123, 108, 68, 68, 31, 13, 35, 52,
31, 25, --, --, --, --, --]],
[[--, --, --, --, --, --, --, --, --, --, --, --, --, --, --,
119, 76, --, --, --, --],
[--, --, --, --, --, --, --, --, --, --, --, --, 109, 120, 95,
105, 124, --, --, --, --],
[--, --, --, --, --, --, --, 183, 145, 145, 176, 186, 169, 161,
138, 129, 141, 141, 115, --, --],
[--, 171, 171, 159, 165, 197, 200, 192, 175, 175, 198, 180,
147, 144, 126, 166, 145, 145, 106, 15, --],
[--, 167, 167, 169, 179, 186, 158, 180, 174, 174, 174, 152,
135, 140, 76, 128, 128, 128, 107, 50, --],
[--, 174, 174, 184, 167, 156, 146, 78, 144, 144, 177, 183, 183,
163, 43, 87, 125, 125, 125, 70, --],
[166, 152, 152, 168, 181, 188, 178, 44, 131, 131, 187, 214,
215, 181, 82, 100, 119, 119, 116, 40, 44],
[165, 137, 137, 156, 182, 191, 176, 147, 184, 184, 184, 187,
192, 173, 133, 130, 105, 105, 111, 25, 29],
[120, 134, 134, 138, 196, 178, 180, 183, 186, 186, 190, 172,
161, 150, 135, 151, 101, 101, 131, 25, 25],
[98, 106, 106, 111, 161, 164, 171, 147, 123, 123, 128, 143,
148, 128, 114, 148, 131, 131, 143, 35, 28],
[155, 154, 154, 118, 112, 129, 145, 110, 106, 106, 122, 120,
89, 45, 37, 84, 148, 148, 168, 74, --],
[200, 195, 195, 134, 91, 126, 145, 99, 116, 116, 118, 69, 22,
0, 1, 35, 135, 135, 164, --, --],
[--, 172, 172, 132, 101, 142, 118, 108, 68, 68, 30, 9, 30, 44,
24, 21, --, --, --, --, --]],
[[--, --, --, --, --, --, --, --, --, --, --, --, --, --, --,
82, 42, --, --, --, --],
[--, --, --, --, --, --, --, --, --, --, --, --, 96, 101, 64,
68, 90, --, --, --, --],
[--, --, --, --, --, --, --, 172, 130, 130, 156, 157, 133, 119,
93, 89, 111, 111, 96, --, --],
[--, 161, 161, 148, 153, 187, 192, 188, 167, 167, 178, 148,
102, 96, 78, 124, 115, 115, 88, 9, --],
[--, 155, 155, 156, 167, 174, 149, 177, 165, 165, 155, 120, 93,
93, 29, 88, 99, 99, 88, 44, --],
[--, 158, 158, 170, 152, 142, 134, 72, 135, 135, 159, 156, 146,
121, 3, 51, 99, 99, 106, 61, --],
[154, 136, 136, 152, 165, 172, 165, 36, 122, 122, 169, 187,
182, 144, 46, 68, 92, 92, 97, 30, 39],
[153, 122, 122, 140, 165, 173, 162, 138, 173, 173, 167, 163,
164, 142, 101, 100, 80, 80, 93, 12, 23],
[109, 118, 118, 122, 177, 159, 163, 167, 170, 170, 174, 155,
141, 130, 112, 126, 80, 80, 113, 11, 17],
[86, 91, 91, 95, 142, 145, 152, 129, 107, 107, 112, 127, 132,
111, 95, 128, 110, 110, 125, 20, 17],
[145, 141, 141, 101, 93, 110, 125, 89, 87, 87, 105, 105, 77,
33, 21, 68, 129, 129, 150, 60, --],
[193, 181, 181, 118, 71, 106, 124, 77, 94, 94, 100, 56, 11, 0,
0, 21, 118, 118, 146, --, --],
[--, 161, 161, 117, 83, 124, 96, 82, 42, 42, 12, 0, 24, 41, 18,
10, --, --, --, --, --]]],
mask=[[[ True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, False, False, True,
True, True, True],
[ True, True, True, True, True, True, True, True, True,
True, True, True, False, False, False, False, False, True,
True, True, True],
[ True, True, True, True, True, True, True, False, False,
False, False, False, False, False, False, False, False, False,
False, True, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, True, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, True, True,
True, True, True]],
[[ True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, False, False, True,
True, True, True],
[ True, True, True, True, True, True, True, True, True,
True, True, True, False, False, False, False, False, True,
True, True, True],
[ True, True, True, True, True, True, True, False, False,
False, False, False, False, False, False, False, False, False,
False, True, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, True, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, True, True,
True, True, True]],
[[ True, True, True, True, True, True, True, True, True,
True, True, True, True, True, True, False, False, True,
True, True, True],
[ True, True, True, True, True, True, True, True, True,
True, True, True, False, False, False, False, False, True,
True, True, True],
[ True, True, True, True, True, True, True, False, False,
False, False, False, False, False, False, False, False, False,
False, True, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, False],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, False, True],
[False, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, False, False,
False, True, True],
[ True, False, False, False, False, False, False, False, False,
False, False, False, False, False, False, False, True, True,
True, True, True]]],
fill_value=999999,
dtype=uint8)
In [ ]:
# Assuming 'shapefile' is a GeoDataFrame that has been properly read and is in the correct CRS
geoms = shapefile.geometry.values # This will give us a numpy array of geometry objects
X = np.array([], dtype=np.float32).reshape(0, band_count) # Adjust dtype and band_count as needed
y = []
with rasterio.open(img_fp) as src:
for geom in geoms: # Loop through each geometry in the array
feature = [mapping(geom)] # Convert to format expected by rasterio.mask.mask
out_image, out_transform = mask(src, feature, crop=True)
# Check for pixels that are not nodata (neither 0 nor 255 in all bands)
if out_image.any(): # If there's any non-nodata pixel
# Filter out the nodata pixels and reshape
out_image_reshaped = out_image[:, (out_image[0] != nodata) & (out_image[0] != 0) & (out_image[0] != 255)].reshape(-1, band_count)
# Now, we need to get the corresponding class for each geometry
class_label = shapefile.loc[shapefile.geometry == geom, 'class'].values[0]
# Extend the X and y arrays
X = np.vstack((X, out_image_reshaped)) # Stack the pixels
y.extend([class_label] * out_image_reshaped.shape[0]) # Extend the labels
In [ ]:
# What are our classification labels?
labels = np.unique(shapefile["class"])
print('The training data include {n} classes: {classes}\n'.format(n=labels.size,
classes=labels))
# We will need a "X" matrix containing our features, and a "y" array containing our labels
print('Our X matrix is sized: {sz}'.format(sz=X.shape))
print('Our y array is sized: {sz}'.format(sz=np.array(y).shape))
The training data include 8 classes: ['cemetery' 'footway' 'funeral_hall' 'grass' 'grave' 'park' 'playground' 'recreation_ground'] Our X matrix is sized: (4155199, 3) Our y array is sized: (4155199,)
In [ ]:
def str_class_to_int(class_array):
class_array[class_array == 'cemetery'] = 0
class_array[class_array == 'footway'] = 1
class_array[class_array == 'funeral_hall'] = 2
class_array[class_array == 'grass'] = 3
class_array[class_array == 'grave'] = 4
class_array[class_array == 'park'] = 5
class_array[class_array == 'playground'] = 6
class_array[class_array == 'recreation_ground'] = 7
return(class_array.astype(int))
In [ ]:
from sklearn.naive_bayes import GaussianNB
gnb = GaussianNB()
gnb.fit(X, y)
Out[ ]:
GaussianNB()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
GaussianNB()
In [ ]:
from rasterio.plot import show
from rasterio.plot import show_hist
from rasterio.windows import Window
from rasterio.plot import reshape_as_raster, reshape_as_image
In [ ]:
with rasterio.open(img_fp) as src:
# may need to reduce this image size if your kernel crashes, takes a lot of memory
img = src.read()
# Take our full image and reshape into long 2d array (nrow * ncol, nband) for classification
print(img.shape)
reshaped_img = reshape_as_image(img)
print(reshaped_img.shape)
(3, 6087, 10016) (6087, 10016, 3)
In [ ]:
class_prediction = gnb.predict(reshaped_img.reshape(-1, 3))
# Reshape our classification map back into a 2D matrix so we can visualize it
class_prediction = class_prediction.reshape(reshaped_img[:, :, 0].shape)
In [ ]:
class_prediction = str_class_to_int(class_prediction)
In [ ]:
def color_stretch(image, index):
colors = image[:, :, index].astype(np.float64)
for b in range(colors.shape[2]):
colors[:, :, b] = rasterio.plot.adjust_band(colors[:, :, b])
return colors
# find the highest pixel value in the prediction image
n = int(np.max(class_prediction))
# next setup a colormap for our map
colors = dict((
(0, (105, 105, 105, 255)), # cemetery - dark grey
(1, (230, 230, 250, 255)), # funeral hall - pale lavender
(2, (144, 238, 144, 255)), # grass - light green
(3, (70, 130, 180, 255)), # memorial - deep blue
(4, (60, 179, 113, 255)), # park - fresh green
(5, (255, 255, 0, 255)), # playground - bright yellow
(6, (255, 165, 0, 255)), # recreation ground - bright orange
(7, (255, 0, 0, 255)), # buildings - red
))
# Put 0 - 255 as float 0 - 1
for k in colors:
v = colors[k]
_v = [_v / 255.0 for _v in v]
colors[k] = _v
index_colors = [colors[key] if key in colors else
(255, 255, 255, 0) for key in range(0, n+1)]
cmap = plt.matplotlib.colors.ListedColormap(index_colors, 'Classification', n+1)
In [ ]:
import matplotlib.patches as mpatches
from matplotlib.colors import ListedColormap
# Define the class labels and their corresponding colors
class_labels = {
0: "cemetery",
1: "footway",
2: "funeral_hall",
3: "grass",
4: "grave",
5: "park",
6: "playground",
7: "recreation ground"
}
patches = [mpatches.Patch(color=colors[key], label=class_labels[key]) for key in class_labels]
fig, axs = plt.subplots(2,1,figsize=(20,15))
img_stretched = reshaped_img
axs[0].imshow(img_stretched)
axs[1].imshow(class_prediction, cmap=cmap, interpolation='none')
axs[1].legend(handles=patches, loc='upper left', bbox_to_anchor=(1.05, 1), borderaxespad=0.)
fig.show()
C:\Users\leoni\AppData\Local\Temp\ipykernel_24832\3134725251.py:26: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown fig.show()
In [ ]:
In [ ]:
from sklearn.ensemble import RandomForestClassifier
import numpy as np
import rasterio
import matplotlib.pyplot as plt
# Create the Random Forest model
rf = RandomForestClassifier()
# Train the model
rf.fit(X, y)
Out[ ]:
RandomForestClassifier()In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook.
On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
RandomForestClassifier()
In [ ]:
with rasterio.open(img_fp) as src:
img = src.read()
reshaped_img = reshape_as_image(img)
# Predict the classes using the Random Forest model
class_prediction = rf.predict(reshaped_img.reshape(-1, 3))
# Reshape the classification map for visualization
class_prediction = str_class_to_int(class_prediction)
In [ ]:
def color_stretch(image, index):
colors = image[:, :, index].astype(np.float64)
for b in range(colors.shape[2]):
colors[:, :, b] = rasterio.plot.adjust_band(colors[:, :, b])
return colors
# find the highest pixel value in the prediction image
n = int(np.max(class_prediction))
# next setup a colormap for our map
colors = dict((
(0, (105, 105, 105, 255)), # cemetery - dark grey
(1, (230, 230, 250, 255)), # funeral hall - pale lavender
(2, (144, 238, 144, 255)), # grass - light green
(3, (70, 130, 180, 255)), # memorial - deep blue
(4, (60, 179, 113, 255)), # park - fresh green
(5, (255, 255, 0, 255)), # playground - bright yellow
(6, (255, 165, 0, 255)), # recreation ground - bright orange
(7, (255, 0, 0, 255)), # buildings - red
))
# Put 0 - 255 as float 0 - 1
for k in colors:
v = colors[k]
_v = [_v / 255.0 for _v in v]
colors[k] = _v
index_colors = [colors[key] if key in colors else
(255, 255, 255, 0) for key in range(0, n+1)]
cmap = plt.matplotlib.colors.ListedColormap(index_colors, 'Classification', n+1)
In [ ]:
import matplotlib.patches as mpatches
from matplotlib.colors import ListedColormap
# Assuming reshaped_img is in the correct format
expected_shape = reshaped_img[:, :, 0].shape
class_prediction_2d = class_prediction.reshape(expected_shape)
fig, axs = plt.subplots(2, 1, figsize=(20, 15))
img_stretched = reshaped_img
axs[0].imshow(img_stretched)
# Use the reshaped 2D array for visualization
axs[1].imshow(class_prediction_2d, cmap=cmap, interpolation='none')
axs[1].legend(handles=patches, loc='upper left', bbox_to_anchor=(1.05, 1), borderaxespad=0.)
plt.show()
In [ ]:
In [ ]:
import geopandas as gpd
import rasterio
from rasterio.mask import mask
from shapely.geometry import mapping
# Load the shapefile
shapefile_path = 'C:/Users/leoni/Documents/Uni/UGS/Project/Funktionert/data/goeggingen_merge.shp'
shapefile = gpd.read_file(shapefile_path)
# Load the RGB ortho image
ortho_image_path = 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif'
with rasterio.open(ortho_image_path) as src:
ortho_image = src.read() # Read the RGB bands
In [ ]:
from sklearn.preprocessing import LabelEncoder
# Initialize the encoder
label_encoder = LabelEncoder()
# Fit the encoder to the class labels and transform them to integers
shapefile['class_encoded'] = label_encoder.fit_transform(shapefile['class'])
# You can save the mapping of classes to integers if needed
class_mapping = dict(zip(label_encoder.classes_, label_encoder.transform(label_encoder.classes_)))
print("Class mapping:", class_mapping)
Class mapping: {'cemetery': 0, 'footway': 1, 'funeral_hall': 2, 'grass': 3, 'grave': 4, 'park': 5, 'playground': 6, 'recreation_ground': 7}
In [ ]:
from rasterio.features import rasterize
# Define the output raster's parameters (match the ortho image)
out_shape = (src.height, src.width)
transform = src.transform
# Rasterize the shapefile
# Rasterize the shapefile using the encoded class labels
class_raster = rasterize(
[(mapping(geom), value) for geom, value in zip(shapefile.geometry, shapefile['class_encoded'])],
out_shape=out_shape,
transform=transform,
#fill=0 # Assuming '0' is the background/nodata class
)
In [ ]:
import rasterio
from rasterio.transform import from_origin
# Define the path for the output raster file
class_raster_path = 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/class_raster.tif'
# Define the metadata for the new raster file
meta = {
'driver': 'GTiff', # GeoTIFF format
'dtype': 'int32', # Adjust dtype according to your needs, int32 is common for class labels
'nodata': 0, # Define the nodata value, ensure it matches your fill value in rasterize
'width': out_shape[1],
'height': out_shape[0],
'count': 1, # Number of bands, 1 for a class label raster
'crs': src.crs, # CRS from your original ortho image raster
'transform': transform # Transform from your original ortho image raster
}
# Write the class_raster to a new raster file
with rasterio.open(class_raster_path, 'w', **meta) as dst:
dst.write(class_raster, 1) # Write class_raster to the first band
In [ ]:
from sklearn.model_selection import train_test_split
# Split shapefile into training and validation sets
train_shapefile, val_shapefile = train_test_split(shapefile, test_size=0.2)
In [ ]:
import numpy as np
import rasterio
from rasterio.mask import mask
from shapely.geometry import mapping
def extract_features_labels(shapefile, raster_path, class_raster_path):
X, y = [], []
with rasterio.open(raster_path) as src, rasterio.open(class_raster_path) as class_raster:
src_nodata = src.nodata
class_nodata = class_raster.nodata if class_raster.nodata is not None else 0
for geom in shapefile.geometry:
# Mask the ortho image raster and class raster with the current geometry
out_image, _ = mask(src, [mapping(geom)], crop=True)
out_labels, _ = mask(class_raster, [mapping(geom)], crop=True)
# Convert to numpy arrays, ensuring compatibility
out_image = np.array(out_image)
out_labels = np.array(out_labels)
# Debugging: Check shapes and types after conversion
print("Converted Out Image Shape:", out_image.shape, "Type:", type(out_image))
print("Converted Out Labels Shape:", out_labels.shape, "Type:", type(out_labels))
# Create a valid mask and apply it in a controlled manner
valid_mask = (out_image[0] != src_nodata) & (out_labels[0] != class_nodata)
for band in range(out_image.shape[0]):
band_data = out_image[band][valid_mask]
if band == 0: # For the first band, initialize the X array for this geometry
geom_X = np.empty((band_data.size, out_image.shape[0]))
geom_X[:, band] = band_data # Fill data for the current band
X.append(geom_X)
y.extend(out_labels[0][valid_mask])
return np.concatenate(X), np.array(y)
# Paths
ortho_image_path = 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/goegingen_pro.tif'
class_raster_path = 'C:/Users/leoni/Documents/Uni/UGS/Project/Classification_data/Imagery/class_raster.tif'
# Extract features and labels
X_train, y_train = extract_features_labels(train_shapefile, ortho_image_path, class_raster_path)
X_val, y_val = extract_features_labels(val_shapefile, ortho_image_path, class_raster_path)
Converted Out Image Shape: (3, 815, 1611) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 815, 1611) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 177, 169) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 177, 169) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 60, 154) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 60, 154) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 223, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 223, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 40, 85) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 40, 85) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 987, 1619) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 987, 1619) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 27) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 27) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 489, 819) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 489, 819) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 25, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 25, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 25, 199) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 25, 199) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 23, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 23, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 19) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 19) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 142, 740) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 142, 740) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 27, 284) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 27, 284) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 69, 111) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 69, 111) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 3, 2) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 3, 2) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 3) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 3) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 86, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 86, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 346, 121) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 346, 121) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 337, 920) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 337, 920) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 71, 110) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 71, 110) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 41) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 41) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 67) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 67) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 3) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 3) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 36, 27) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 36, 27) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 417, 140) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 417, 140) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 82, 884) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 82, 884) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1191, 2142) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1191, 2142) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 249, 537) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 249, 537) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 850, 253) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 850, 253) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 19) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 19) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 20, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 20, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 101, 109) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 101, 109) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 134, 190) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 134, 190) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 123, 135) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 123, 135) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 91) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 91) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 53) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 53) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 149, 330) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 149, 330) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 54, 54) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 54, 54) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 61, 164) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 61, 164) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 499, 487) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 499, 487) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 100, 180) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 100, 180) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 87, 59) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 87, 59) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 40, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 40, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 58, 211) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 58, 211) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 29, 234) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 29, 234) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 53, 104) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 53, 104) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 312) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 312) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 215, 522) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 215, 522) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 31, 9) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 31, 9) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 74, 131) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 74, 131) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 38, 402) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 38, 402) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 21, 87) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 21, 87) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 119, 82) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 119, 82) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 134, 88) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 134, 88) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 39, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 39, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 24, 124) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 24, 124) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 29, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 29, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 141) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 141) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 100, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 100, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 21, 32) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 21, 32) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 20, 270) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 20, 270) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 135, 253) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 135, 253) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 59) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 59) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 37, 853) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 37, 853) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 59, 189) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 59, 189) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 186, 246) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 186, 246) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 56, 99) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 56, 99) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 19) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 19) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 39, 93) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 39, 93) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 445, 589) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 445, 589) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 185, 48) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 185, 48) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 230) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 230) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 202) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 202) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 244, 452) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 244, 452) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 33, 10) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 33, 10) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 418, 269) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 418, 269) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 31) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 31) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 34, 249) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 34, 249) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 36, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 36, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 280, 331) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 280, 331) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 46, 75) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 46, 75) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 419, 704) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 419, 704) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 417, 466) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 417, 466) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 31) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 31) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 32, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 32, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 4, 3) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 4, 3) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 285, 296) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 285, 296) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 202, 235) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 202, 235) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 311) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 311) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 30) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 30) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 26) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 26) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 201, 2129) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 201, 2129) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 32, 80) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 32, 80) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 64, 45) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 64, 45) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 160, 284) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 160, 284) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 115) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 115) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 73, 105) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 73, 105) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 173, 1222) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 173, 1222) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 217) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 217) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 127, 1324) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 127, 1324) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 38) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 38) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 30, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 30, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1223, 1421) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1223, 1421) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 72, 32) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 72, 32) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 87) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 87) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 48, 31) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 48, 31) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 72) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 72) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 135, 642) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 135, 642) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 151, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 151, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 20, 317) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 20, 317) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 25, 96) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 25, 96) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 287) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 287) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 72, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 72, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 144, 245) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 144, 245) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 75, 726) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 75, 726) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 38, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 38, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 156) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 156) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 47, 59) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 47, 59) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 178, 1139) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 178, 1139) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 67) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 67) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 27, 102) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 27, 102) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 30, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 30, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 134, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 134, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 101, 117) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 101, 117) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 286) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 286) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 36, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 36, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 25) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 25) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 37, 149) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 37, 149) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 50, 143) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 50, 143) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 24, 75) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 24, 75) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 187, 276) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 187, 276) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 105, 33) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 105, 33) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 118) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 118) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 196, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 196, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 99, 50) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 99, 50) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 104, 262) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 104, 262) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 35, 126) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 35, 126) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 166, 149) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 166, 149) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 314) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 314) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 782, 390) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 782, 390) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 231, 395) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 231, 395) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 233, 383) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 233, 383) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 46, 148) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 46, 148) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 37, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 37, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 26) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 26) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 111, 132) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 111, 132) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 947, 474) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 947, 474) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 300, 34) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 300, 34) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 52) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 52) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 494, 812) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 494, 812) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 90, 45) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 90, 45) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 36) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 36) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 534, 1986) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 534, 1986) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 346) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 346) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 373, 517) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 373, 517) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 48) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 48) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 43, 82) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 43, 82) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 139, 65) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 139, 65) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 203, 106) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 203, 106) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 369, 150) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 369, 150) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 104, 458) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 104, 458) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 481, 173) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 481, 173) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 235, 621) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 235, 621) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 36, 33) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 36, 33) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 78, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 78, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 26, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 26, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 129, 1336) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 129, 1336) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 311) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 311) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 68, 111) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 68, 111) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 21, 439) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 21, 439) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 164, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 164, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 115, 43) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 115, 43) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 44) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 44) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 94, 139) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 94, 139) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 308, 164) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 308, 164) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 236, 103) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 236, 103) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 111) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 111) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 104, 392) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 104, 392) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 281) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 281) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 44) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 44) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 71) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 71) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 68, 102) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 68, 102) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 71, 35) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 71, 35) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 121, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 121, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 19) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 19) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 27) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 27) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 309) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 309) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 107, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 107, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 35, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 35, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 40) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 40) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 129, 196) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 129, 196) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 755, 111) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 755, 111) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 512, 616) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 512, 616) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 25) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 25) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 23, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 23, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 230, 146) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 230, 146) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 33) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 33) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 35, 248) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 35, 248) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 99) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 99) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 355, 107) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 355, 107) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 8) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 8) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 608, 1422) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 608, 1422) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 35) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 35) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 152, 216) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 152, 216) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 71) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 71) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 167, 299) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 167, 299) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 156) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 156) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1051, 109) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1051, 109) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 48, 71) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 48, 71) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 21, 41) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 21, 41) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 95, 58) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 95, 58) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 174) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 174) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 29, 93) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 29, 93) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 77, 48) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 77, 48) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 571, 978) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 571, 978) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 27, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 27, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 85) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 85) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 31) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 31) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 99, 48) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 99, 48) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 550, 1767) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 550, 1767) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1095, 156) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1095, 156) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 26, 52) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 26, 52) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 72) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 72) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 32, 642) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 32, 642) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 25) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 25) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 98, 349) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 98, 349) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 129, 308) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 129, 308) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 30) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 30) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 683, 282) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 683, 282) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 278) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 278) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 8) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 8) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 42) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 42) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 37) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 37) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 67, 76) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 67, 76) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 88, 276) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 88, 276) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 21, 147) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 21, 147) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 175, 99) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 175, 99) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 69, 26) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 69, 26) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 121, 177) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 121, 177) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 3) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 3) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 203) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 203) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 99) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 99) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 21, 42) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 21, 42) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1560, 739) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1560, 739) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 196, 25) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 196, 25) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 358, 468) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 358, 468) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 25) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 25) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 483, 843) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 483, 843) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 27, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 27, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 80, 58) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 80, 58) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 53, 143) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 53, 143) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 98, 479) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 98, 479) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 54, 96) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 54, 96) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 85) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 85) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 29, 9) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 29, 9) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 48, 71) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 48, 71) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 49, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 49, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 53, 128) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 53, 128) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 35, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 35, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 19) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 19) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 19) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 19) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 155) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 155) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 716, 500) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 716, 500) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 122, 66) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 122, 66) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 298) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 298) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 77) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 77) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 75, 91) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 75, 91) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 48, 91) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 48, 91) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 23, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 23, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 86) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 86) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 28, 111) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 28, 111) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 125, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 125, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 40, 10) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 40, 10) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 87) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 87) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 507, 714) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 507, 714) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 8) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 8) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 290, 165) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 290, 165) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 131, 253) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 131, 253) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 30, 79) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 30, 79) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 50, 110) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 50, 110) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 229, 26) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 229, 26) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 37, 238) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 37, 238) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 166) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 166) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 211) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 211) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 197, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 197, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 590, 357) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 590, 357) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 59) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 59) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 30, 260) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 30, 260) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 192, 58) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 192, 58) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 67, 30) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 67, 30) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 168) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 168) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 345, 97) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 345, 97) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 558, 689) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 558, 689) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 29, 448) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 29, 448) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 135, 160) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 135, 160) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 111, 155) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 111, 155) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 61, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 61, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 24, 34) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 24, 34) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 102, 1410) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 102, 1410) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 284, 47) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 284, 47) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 54) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 54) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 640, 111) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 640, 111) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 231, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 231, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 670, 1736) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 670, 1736) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 37, 147) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 37, 147) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 68, 60) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 68, 60) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 429, 55) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 429, 55) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 85) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 85) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 45, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 45, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 30, 32) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 30, 32) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 52, 78) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 52, 78) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 41, 53) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 41, 53) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 56, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 56, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 23, 88) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 23, 88) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 56) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 56) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 283) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 283) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 97, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 97, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 99, 50) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 99, 50) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 214) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 214) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 252, 40) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 252, 40) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 64) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 64) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 56) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 56) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 54, 400) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 54, 400) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 145) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 145) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 8) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 8) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 51, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 51, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 142, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 142, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 229, 113) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 229, 113) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 26, 44) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 26, 44) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 44) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 44) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 34, 82) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 34, 82) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 113, 152) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 113, 152) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 41, 78) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 41, 78) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 31, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 31, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 75, 133) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 75, 133) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 35) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 35) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 188, 76) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 188, 76) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 36) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 36) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 45, 55) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 45, 55) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 80) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 80) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 41) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 41) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 195, 341) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 195, 341) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 47) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 47) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1040, 547) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1040, 547) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 108, 110) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 108, 110) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 117, 109) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 117, 109) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 44) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 44) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 45) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 45) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 496, 1010) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 496, 1010) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 25, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 25, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 23, 8) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 23, 8) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 255, 303) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 255, 303) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 72) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 72) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 42, 158) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 42, 158) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 56) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 56) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 23, 157) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 23, 157) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 15, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 15, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 25, 39) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 25, 39) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 86, 80) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 86, 80) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 239, 172) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 239, 172) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 24, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 24, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 39) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 39) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 336, 48) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 336, 48) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 75) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 75) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 139, 28) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 139, 28) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 43, 497) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 43, 497) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 36, 222) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 36, 222) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 26, 244) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 26, 244) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 3, 2) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 3, 2) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 90, 561) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 90, 561) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 67, 9) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 67, 9) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1194, 125) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1194, 125) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 68) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 68) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 36) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 36) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 8) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 8) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 69) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 69) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 205) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 205) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 80, 128) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 80, 128) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 18, 30) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 18, 30) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 400, 594) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 400, 594) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 261, 732) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 261, 732) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 93, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 93, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 32, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 32, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 158, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 158, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 55, 27) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 55, 27) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 1073, 617) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 1073, 617) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 170, 418) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 170, 418) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 47) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 47) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 32) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 32) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 4, 6) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 4, 6) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 97) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 97) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 76, 40) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 76, 40) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 15) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 230, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 230, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 20, 102) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 20, 102) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 104, 156) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 104, 156) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 160, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 160, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 55, 13) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 55, 13) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 156) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 156) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 285) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 285) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 25) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 25) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 14, 81) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 14, 81) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 102, 9) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 102, 9) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 97, 34) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 97, 34) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 22) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 22) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 74, 102) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 74, 102) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 153, 31) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 153, 31) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 33, 439) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 33, 439) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 65) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 65) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 194, 84) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 194, 84) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 140, 174) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 140, 174) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 75, 37) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 75, 37) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 133) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 133) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 24) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 24) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 547, 57) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 547, 57) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 699, 244) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 699, 244) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 67, 95) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 67, 95) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 28, 200) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 28, 200) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 172, 469) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 172, 469) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 13, 111) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 13, 111) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 66, 407) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 66, 407) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 12, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 84, 11) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 84, 11) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 165, 242) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 165, 242) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 147) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 147) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 569, 98) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 569, 98) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 22, 17) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 22, 17) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 109, 151) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 109, 151) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 27) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 27) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 46, 488) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 46, 488) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 16, 21) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 16, 21) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 20) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 20) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 197, 50) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 197, 50) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 85) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 85) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 17, 25) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 17, 25) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 98, 46) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 98, 46) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 156, 362) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 156, 362) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 44, 63) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 44, 63) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 10, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 10, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 102, 232) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 102, 232) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 769, 842) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 769, 842) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 6, 7) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 6, 7) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 5, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 5, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 29, 19) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 29, 19) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 14) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 14) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 8, 123) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 8, 123) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 267, 197) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 267, 197) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 223, 68) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 223, 68) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 115, 12) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 115, 12) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 33, 8) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 33, 8) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 192, 132) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 192, 132) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 203, 2076) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 203, 2076) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 7, 23) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 7, 23) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 9, 48) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 9, 48) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 11, 18) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 11, 18) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 328, 176) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 328, 176) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 31, 29) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 31, 29) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 19, 196) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 19, 196) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 36, 16) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 36, 16) Type: <class 'numpy.ndarray'> Converted Out Image Shape: (3, 168, 396) Type: <class 'numpy.ndarray'> Converted Out Labels Shape: (1, 168, 396) Type: <class 'numpy.ndarray'>
In [ ]:
X_val
Out[ ]:
array([[208., 202., 190.],
[204., 200., 188.],
[198., 194., 182.],
...,
[146., 142., 143.],
[153., 149., 150.],
[154., 150., 151.]])
In [ ]:
from sklearn.ensemble import RandomForestClassifier
from xgboost import XGBClassifier
# Adjusting labels to start from 0
y_train_adj = y_train - 1
y_val_adj = y_val - 1
# Train Random Forest
rf = RandomForestClassifier()
rf.fit(X_train, y_train_adj)
# Train XGBoost
xgb = XGBClassifier()
xgb.fit(X_train, y_train_adj)
Out[ ]:
XGBClassifier(base_score=None, booster=None, callbacks=None,
colsample_bylevel=None, colsample_bynode=None,
colsample_bytree=None, device=None, early_stopping_rounds=None,
enable_categorical=False, eval_metric=None, feature_types=None,
gamma=None, grow_policy=None, importance_type=None,
interaction_constraints=None, learning_rate=None, max_bin=None,
max_cat_threshold=None, max_cat_to_onehot=None,
max_delta_step=None, max_depth=None, max_leaves=None,
min_child_weight=None, missing=nan, monotone_constraints=None,
multi_strategy=None, n_estimators=None, n_jobs=None,
num_parallel_tree=None, objective='multi:softprob', ...)In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.
XGBClassifier(base_score=None, booster=None, callbacks=None,
colsample_bylevel=None, colsample_bynode=None,
colsample_bytree=None, device=None, early_stopping_rounds=None,
enable_categorical=False, eval_metric=None, feature_types=None,
gamma=None, grow_policy=None, importance_type=None,
interaction_constraints=None, learning_rate=None, max_bin=None,
max_cat_threshold=None, max_cat_to_onehot=None,
max_delta_step=None, max_depth=None, max_leaves=None,
min_child_weight=None, missing=nan, monotone_constraints=None,
multi_strategy=None, n_estimators=None, n_jobs=None,
num_parallel_tree=None, objective='multi:softprob', ...)In [ ]:
from sklearn.metrics import accuracy_score
# Predict with Random Forest
y_pred_rf = rf.predict(X_val)
print("Random Forest Accuracy:", accuracy_score(y_val, y_pred_rf))
# Predict with XGBoost
y_pred_xgb = xgb.predict(X_val)
print("XGBoost Accuracy:", accuracy_score(y_val, y_pred_xgb))
Random Forest Accuracy: 0.01012361521915662 XGBoost Accuracy: 0.007233637806886214
In [ ]:
import rasterio
import numpy as np
# Open the RGB image
with rasterio.open(ortho_image_path) as src:
# Read the image data
img = src.read() # Assuming the image has 3 bands corresponding to RGB
# Reshape the image data for prediction: flatten spatial dimensions while preserving bands
img_reshaped = img.reshape(img.shape[0], -1).T # Transpose to have shape (n_samples, n_bands)
# Make predictions with the chosen model (e.g., Random Forest or XGBoost)
y_pred = xgb.predict(img_reshaped) # Use rf or xgb depending on which model you want to use
In [ ]:
# Assuming `img` is the variable holding the read image data (as in the previous step)
# img.shape would be (num_bands, height, width)
# Reshape the predictions to match the original image's spatial dimensions
pred_reshaped = y_pred.reshape(img.shape[1], img.shape[2])
# Write the predictions to a new raster file
with rasterio.open(
'prediction.tif', 'w',
driver='GTiff',
height=pred_reshaped.shape[0],
width=pred_reshaped.shape[1],
count=1, # Single band for predicted classes
dtype=pred_reshaped.dtype,
crs=src.crs,
transform=src.transform,
) as dst:
dst.write(pred_reshaped, 1)
In [ ]:
y_pred
Out[ ]:
array([0, 4, 4, ..., 0, 0, 0], dtype=int64)
In [ ]:
# Plot the prediction raster
plt.figure(figsize=(10, 10)) # Adjust the figure size as needed
plt.imshow(pred_reshaped, cmap='viridis') # Choose a colormap that suits your data ('viridis', 'jet', etc.)
plt.colorbar(label='Predicted Class') # Show color scale
plt.title('Prediction Raster')
plt.xlabel('Pixel X Coordinate')
plt.ylabel('Pixel Y Coordinate')
plt.show()
In [ ]:
rgb = np.rollaxis(img, 0, 3) # This moves the first axis (bands) to the last position
plt.figure(figsize=(10, 5))
plt.subplot(2, 1, 1) # 1 row, 2 columns, 1st subplot
plt.imshow(rgb)
plt.title('Original Image')
plt.xlabel('Pixel X Coordinate')
plt.ylabel('Pixel Y Coordinate')
from matplotlib.patches import Patch
# Plot the prediction raster
plt.subplot(2, 1, 2) # 1 row, 2 columns, 2nd subplot
prediction_plot = plt.imshow(pred_reshaped, cmap='viridis') # Ensure cmap is the same as used before
# Create a custom legend
# Generate a list of unique labels in your prediction raster
unique_labels = np.unique(pred_reshaped)
# Create a list of colors from the colormap used for each unique label
colors = [prediction_plot.cmap(prediction_plot.norm(label)) for label in unique_labels]
# Create a list of patches for the legend
patches = [Patch(color=colors[i], label=f"Class {label}") for i, label in enumerate(unique_labels)]
plt.legend(handles=patches, bbox_to_anchor=(1.05, 1), loc=2, borderaxespad=0.)
plt.title('Prediction Raster')
plt.xlabel('Pixel X Coordinate')
plt.ylabel('Pixel Y Coordinate')
plt.tight_layout() # Adjust layout to not overlap
plt.show()
Class mapping: 'cemetery': 0, 'footway': 1, 'funeral_hall': 2, 'grass': 3, 'grave': 4, 'park': 5, 'playground': 6, 'recreation_ground': 7
In [ ]:
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable # Import make_axes_locatable
# Define the size of the figure
fig, (ax1, ax2) = plt.subplots(2, 1, figsize=(8, 12))
# Define the coordinates for the right upper quarter
x_min, x_max = int(pred_reshaped.shape[1] / 2), pred_reshaped.shape[1]
y_min, y_max = 0, int(pred_reshaped.shape[0] / 2)
# Plot the original RGB image (subset)
ax1.imshow(rgb[y_min:y_max, x_min:x_max])
ax1.set_title('Original Image')
ax1.set_xlabel('Pixel X Coordinate')
ax1.set_ylabel('Pixel Y Coordinate')
# Plot the prediction raster (subset)
prediction_plot = ax2.imshow(pred_reshaped[y_min:y_max, x_min:x_max], cmap='viridis', extent=[x_min, x_max, y_min, y_max])
ax2.set_title('Prediction Raster')
ax2.set_xlabel('Pixel X Coordinate')
ax2.set_ylabel('Pixel Y Coordinate')
# Create a divider to position the colorbar for the prediction raster
divider = make_axes_locatable(ax2)
cax = divider.append_axes("right", size="5%", pad=0.1)
# Add a colorbar for the prediction raster
colorbar = plt.colorbar(prediction_plot, cax=cax)
colorbar.set_label('Class Labels')
cax.yaxis.set_label_position('left') # Position colorbar labels to the left
plt.tight_layout()
plt.show()
In [ ]: